﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<HitchSite.Models.Home.HomeIndexModel>" %>
<%@ Import Namespace="MvcContrib.FluentHtml"%>
<%@ Import Namespace="System.Web.Mvc"%>
<%
    foreach(var item in Model.TripsShort)
    {%>
        <div>
            <p>Trip starts in <span class="greenbold"><%=item.From %></span> on <span class="blue"><%=item.StartDate.ToShortDateString() %></span> </p>
            <p><span>Finish point is <span class="greenbold"><%=item.To %></span> and we plan to be there on 
                <span class="blue"><%=item.FinishDate.ToShortDateString() %></span></p>
            
            <p><span class="bluebold"><%=item.NbOfPartisipants %></span> adventurer<%= (item.NbOfPartisipants > 1) ? "s" : "" %> joined to the trip
            <br /><%if(item.IsRoundTrip){%><span class="italic">It is a round-trip.</span> <%}%></p>
        </div>
        <div>
            <%=Html.ActionLink("More info...", string.Format("TripInfo/{0}", item.Id)) %>
        </div>
        <hr />
        
  <%}%>